package message.response;

import javax.crypto.SecretKey;
import javax.crypto.spec.IvParameterSpec;

import message.Response;

/**
 * Authenticates the client with the provided username and password.
 * <p/>
 * <b>Request</b>:<br/>
 * {@code !login &lt;username&gt; &lt;password&gt;}<br/>
 * <b>Response:</b><br/>
 * {@code !login success}<br/>
 * or<br/>
 * {@code !login wrong_credentials}
 *
 * @see message.request.LoginRequest
 */
public class OKLoginResponse implements Response {
	private static final long serialVersionUID = 3134831924072300109L;

	
	private final String clientchallenge;
	private final String proxychallenge;
	private final byte[] secretkey;
	private final byte[] ivparameter;

	public OKLoginResponse(String clientchallenge,String proxychallenge,byte[] secretkey, byte[] ivparameter) {
		this.clientchallenge = clientchallenge;
		this.proxychallenge = proxychallenge;
		this.secretkey = secretkey;
		this.ivparameter = ivparameter;
	}

	public String getClientchallenge() {
		return clientchallenge;
	}

	public String getProxychallange() {
		return proxychallenge;
	}
	
	public byte[] getSecretkey() {
		return secretkey;
	}
	
	public byte[] getivparameter() {
		return ivparameter;
	}
	
	@Override
	public String toString() {
		return "!ok ";
	}
}
